package com.tiancheng.trade.order.enums;

import com.tiancheng.trade.commom.core.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 退款状态
 *
 * @author kellen
 * @date 2024/3/27
 */
@Getter
@AllArgsConstructor
public enum RefundStatusEnum implements BaseEnum<String> {

	ing("IG", "退款中"),
	fail("FL", "退款失败"),
	success("SC", "退款成功"),
	processing("PO", "处理中"),
	audit("AU", "待审核"),
	auditFail("AF", "审核不通过"),
	;

	private String code;
	private String desc;

	public static String getDesc(String code) {
		RefundStatusEnum[] businessModeEnums = values();
		for (RefundStatusEnum statusEnum : businessModeEnums) {
			if (statusEnum.code().equals(code)) {
				return statusEnum.desc();
			}
		}
		return null;
	}

	public String code() {
		return this.code;
	}

	public String desc() {
		return this.desc;
	}
}
